//
//  WSSafeMutableArray.h
//  WSBaseKit
//
//  Created by zhangcong on 2020/8/13.
//  Copyright © 2020 zhangcong. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface WSSafeMutableArray : NSObject


@property (nonatomic, strong) dispatch_queue_t MSyncQueue;
@property (nonatomic, strong) NSMutableArray*  MDataArray;


- (id)objectAtIndex:(NSUInteger)index;
-(NSEnumerator *)objectEnumerator;
- (void)insertObject:(id)anObject atIndex:(NSUInteger)index ;
- (void)addObject:(id)anObject;
- (void)removeObjectAtIndex:(NSUInteger)index;
- (void)removeLastObject;
- (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
- (void)removeAllObjects;
- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject;
- (NSUInteger)indexOfObject:(id)anObject;
- (NSInteger)count;

- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))block;


@end

NS_ASSUME_NONNULL_END
